


class Solution:
    def digitCount(self, num: str) -> bool:
        for i in range(len(num)):
            print(num.count(str(i)))
            if num.count(str(i)) != int(num[i]):
                return False
        return True

if __name__ == '__main__':
    num = "1210"
    solution = Solution()
    val = solution.digitCount(num)
    print(val)